function reducer(state = 1000, action) {
  const { type, payload } = action
  console.log(type)
  if (type === 'ADD') return state + payload
  if (type === 'MINUS') return state - payload
  return state
}

export default reducer
